<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<div id="title">
				
				</div>
				
				<div id="navigate">
					
					<ul>
					<s:iterator id="topicList_1" value="#request.topicList">
						<li><a href="index?newsinfo.topic.id=${topicList_1.id}">${topicList_1.name}</a></li>
					</s:iterator>
						
					</ul>
				</div>
				
				<div id="news_list">
					<s:if test="#request.newsList != null && #request.newsList.size()>0">
						<ul>
							<s:iterator id="news" value="#request.newsList">
								<li>
									<a href="newsRead?newsinfo.id=${news.id }">${news.title}</a>
									<span>${news.createDate }</span>
								</li>
							</s:iterator>
						</ul>
						
						<div id="show_page">
					<ul>
						<s:if test="pager.curPage > 1">
							<li> <a href="index?pager.curPage=1&newsinfo.topic.id=${requestScope.newsinfo.topic.id }">首页</a> </li>
							<li><a href="index?pager.curPage=${pager.curPage - 1}&newsinfo.topic.id=${requestScope.newsinfo.topic.id }">上一页</a></li>
						</s:if>
						
						<s:if test="pager.curPage < pager.pageCount">
				 			<li><a href="index?pager.curPage=${pager.curPage + 1 }&newsinfo.topic.id=${requestScope.newsinfo.topic.id }">下一页</a></li>
				 			<li><a href="index?pager.curPage=${pager.pageCount }&newsinfo.topic.id=${requestScope.newsinfo.topic.id }">尾页</a></li>
				 			
				 		</s:if>
				 		<li>总共${pager.curPage}/${pager.pageCount} 页</li>
				 		<li>
				 		  <form action="index" method="post">
				 		  	跳转到<select name="pager.curPage" size="1">
				 		  		<s:bean name="org.apache.struts2.util.Counter" id="counter">
				 		  			<s:param name="first" value="1"/>
				 		  			<s:param name="last" value="%{pager.pageCount}"/>
				 		  			<s:iterator>
				 		  				<option value='<s:property/>'><s:property/></option>
				 		  			</s:iterator>
				 		  		</s:bean>
				 		  	</select>
				 		  	<input type="hidden" name="newsinfo.topic.id" value="${requestScope.newsinfo.topic.id}"/>
				 		  	<input type="submit" value="跳转"/>
				 		  </form>
				 		</li>
					</ul>
				</div>
						
					</s:if>
					<s:else>
					<div class="no_news">
						抱歉，暂无新闻!
					</div>
					</s:else>
					
				</div>
				
					
</body>
</html>